package com.yuwei.play.mvi

import com.yuwei.common.BaseApiService
import com.yuwei.database.entity.MovieEntity
import com.yuwei.common.entity.Res
import com.yuwei.play.entity.*
import kotlinx.coroutines.flow.Flow
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface PlayApiService : BaseApiService {
    //推荐视频
    @GET("/videomulti/getRecommendMutilVideo")
    fun getVideoRecommend(@Query("page")page:Int, @Query("pagesize")pagesize:Int): Flow<Res<MovieEntity>>
    //评论
    @GET("/comment/getCommentByUserId")
    fun getVideoComment(@Query("datatype")datatype:Int,@Query("itemid")itemid:String):Flow<Res<CommentEntity>>
    //发布评论
    @POST("/comment/publishComment")
    fun sendComment(@Body sendCommentBody: SendCommentBody):Flow<Res<SendCommentEntity>>
    //发布回复评论
    @POST("/reply/reply")
    fun reply(@Body replyBody: ReplyBody):Flow<Res<ReplyEntity>>
    @DELETE("/comment/removeComment")
    fun commentDelete(@Query("id")id:Int):Flow<Res<String>>
    @DELETE("/reply/removeReply")
    fun replyDelete(@Query("id")id:Int):Flow<Res<String>>
    //弹幕
    @GET("/bulletscreen/getBulletScreenInfo")
    fun getBullet(@Query("datatype")datatype:Int,@Query("itemid")itemid:String):Flow<Res<BulletEntity>>
}